package com.zkgl.rent.domain;

import java.math.BigDecimal;
import java.util.Date;

import org.springframework.data.annotation.Transient;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zkgl.common.annotation.Excel;
import com.zkgl.common.core.domain.BaseEntity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 租赁合同对象 zk_contract
 * 
 * @author macro
 * @date 2025-09-25
 */
@Data
@ToString
@EqualsAndHashCode(callSuper = false)
public class Contract extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 合同ID */
    private String id;

    /** 所属房东ID */
    @Excel(name = "所属房东ID")
    private Long landlordId;
    
    /** 所属房东名称 */
    @Transient
    private String landlordName;

    /** 租客ID */
    @Excel(name = "租客ID")
    private String tenantId;
    
    /** 租客 */
    @Transient
    private String tenantName;

    /** 房源ID */
    @Excel(name = "房源ID")
    private String propertyId;
    
    /** 房源 */
    @Transient
    private String propertyName;

    /** 合同编号 */
    @Excel(name = "合同编号")
    private String contractNo;

    /** 起租日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "起租日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /** 到期日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "到期日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /** 签约日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "签约日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date signDate;

    /** 月租金（元） */
    @Excel(name = "月租金", readConverterExp = "元=")
    private BigDecimal rentAmount;

    /** 押金金额 */
    @Excel(name = "押金金额")
    private BigDecimal depositAmount;

    /** 付款周期 */
    @Excel(name = "付款周期")
    private String paymentCycle;

    /** 下次付款日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下次付款日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date nextPaymentDate;

    /** 合同状态 */
    @Excel(name = "合同状态")
    private String status;

}
